home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus Special 23
/
AMIGAplus Sonderheft 23 (2000)(Falke)(DE)[!].iso
/
Tools
/
Packer
/
xad
/
Developer
/
Include
/
ASM
/
libraries
/
xadmaster.i
Wrap
Text File
|
1999-11-06
|
16KB
|
410 lines
IFND LIBRARIES_XADMASTER_I
LIBRARIES_XADMASTER_I SET 1
*
* $VER: xadmaster.i 1.1 (18.11.1998)
* xadmaster.library defines and structures
*
* Copyright © 1998 by Dirk Stöcker
* All Rights Reserved.
*
IFND EXEC_LIBRARIES_I
INCLUDE "exec/libraries.i"
ENDC
IFND UTILITY_TAGITEM_I
INCLUDE "utility/tagitem.i"
ENDC
* NOTE: The structures do not have size labels, as they have no fixed
* size. You always need to call xadAllocObject to get them
*************************************************************************
* *
* library base structure *
* *
*************************************************************************
STRUCTURE xadMasterBase,LIB_SIZE
APTR xmb_SysBase
APTR xmb_DOSBase
APTR xmb_UtilityBase
ULONG xmb_RecogSize * read only
*************************************************************************
* *
* tag-function call flags *
* *
*************************************************************************
* input tags for xadGetInfo, only one can be specified per call
XAD_INSIZE EQU (TAG_USER+001) * input data size
XAD_INFILENAME EQU (TAG_USER+002)
XAD_INFILEHANDLE EQU (TAG_USER+003)
XAD_INMEMORY EQU (TAG_USER+004)
XAD_INHOOK EQU (TAG_USER+005)
* output tags, only one can be specified per call, xadXXXXUnArc
XAD_OUTSIZE EQU (TAG_USER+010) * output data size
XAD_OUTFILENAME EQU (TAG_USER+011)
XAD_OUTFILEHANDLE EQU (TAG_USER+012)
XAD_OUTMEMORY EQU (TAG_USER+013)
XAD_OUTHOOK EQU (TAG_USER+014)
XAD_OUTDEVICE EQU (TAG_USER+015) * for disk archives only
* object allocation tags for xadAllocObjectA
XAD_OBJNAMESIZE EQU (TAG_USER+020) * XADOBJ_FILEINFO, size of needed name space
XAD_OBJCOMMENTSIZE EQU (TAG_USER+021) * XADOBJ_FILEINFO, size of needed comment space
XAD_OBJPRIVINFOSIZE EQU (TAG_USER+022) * XADOBJ_FILEINFO & XADOBJ_DISKINOF, self use size
XAD_OBJBLOCKENTRIES EQU (TAG_USER+023) * XADOBJ_DISKINFO, number of needed entries
* tags for xadGetInfo, xadFileUnArc and xadDiskUnArc
XAD_NOEXTERN EQU (TAG_USER+050) * do not use extern clients
XAD_PASSWORD EQU (TAG_USER+051) * password when needed
XAD_ENTRYNUMBER EQU (TAG_USER+052) * number of wanted entry
XAD_PROGRESSHOOK EQU (TAG_USER+053) * the progress hook
XAD_OVERWRITE EQU (TAG_USER+054) * overwrite file ?
XAD_MAKEDIRECTORY EQU (TAG_USER+055) * create directory tree
XAD_IGNOREGEOMETRY EQU (TAG_USER+056) * ignore drive geometry ?
XAD_LOWCYLINDER EQU (TAG_USER+057) * lowest cylinder
XAD_HIGHCYLINDER EQU (TAG_USER+058) * highest cylinder
* input tags for xadConvertDates, only one can be passed
XAD_DATEUNIXUTC EQU (TAG_USER+070) * unix date variable
XAD_DATEAMIGA EQU (TAG_USER+071) * amiga date variable
XAD_DATEDATESTAMP EQU (TAG_USER+072) * struct DateStamp
XAD_DATEXADDATE EQU (TAG_USER+073) * struct xadDate
XAD_DATECLOCKDATA EQU (TAG_USER+074) * struct ClockData
XAD_DATECURRENTTIME EQU (TAG_USER+075) * input is system time
* output tags, there can be specified multiple tags for one call
XAD_GETDATEUNIXUTC EQU (TAG_USER+080) * unix date variable
XAD_GETDATEAMIGA EQU (TAG_USER+081) * amiga date variable
XAD_GETDATEDATESTAMP EQU (TAG_USER+082) * struct DateStamp
XAD_GETDATEXADDATE EQU (TAG_USER+083) * struct xadDate
XAD_GETDATECLOCKDATA EQU (TAG_USER+084) * struct ClockData
*************************************************************************
* *
* objects for xadAllocObjectA *
* *
*************************************************************************
XADOBJ_ARCHIVEINFO EQU $0001 * struct xadArchiveInfo
XADOBJ_FILEINFO EQU $0002 * struct xadFileInfo
XADOBJ_DISKINFO EQU $0003 * struct xadDiskInfo
XADOBJ_HOOKPARAM EQU $0004 * struct HookParam
XADOBJ_DEVICEINFO EQU $0005 * struct xadDeviceInfo
XADOBJ_PROGRESSINFO EQU $0006 * struct xadProgressInfo
*************************************************************************
* *
* hook related stuff *
* *
*************************************************************************
XADHC_READ EQU 1 * read data into buffer
XADHC_WRITE EQU 2 * write buffer data to file/memory
XADHC_SEEK EQU 3 * seek in file
XADHC_INIT EQU 4 * initialize the hook
XADHC_FREE EQU 5 * end up hook work, free stuff
XADHC_ABORT EQU 6 * an error occured, delete partial stuff
XADHC_FULLSIZE EQU 7 * complete input size is needed
STRUCTURE xadHookParam,0
ULONG xhp_Command
ULONG xhp_CommandData
APTR xhp_BufferPtr
LONG xhp_BufferSize
LONG xhp_DataPos * current seek position
APTR xhp_PrivatePtr
* xadHookAccess commands
XADAC_READ EQU 10 * get data
XADAC_WRITE EQU 11 * write data
XADAC_COPY EQU 12 * copy input to ouput
XADAC_INPUTSEEK EQU 13 * seek in input file
XADAC_OUTPUTSEEK EQU 14 * seek in output file
*************************************************************************
* *
* support structures *
* *
*************************************************************************
* Own date structure to cover all possible dates in a human friendly
* format. xadConvertDates may be used to convert between different date
* structures and variables.
STRUCTURE xadDate,0
ULONG xd_Micros * values 0 to 999999
LONG xd_Year * values 1 to 2147483648
UBYTE xd_Month * values 1 to 12
UBYTE xd_WeekDay * values 1 to 7
UBYTE xd_Day * values 1 to 31
UBYTE xd_Hour * values 0 to 23
UBYTE xd_Minute * values 0 to 60
UBYTE xd_Second * values 0 to 60
LABEL xadDate_SIZE
XADDAY_MONDAY EQU 1 * monday is the first day and
XADDAY_TUESDAY EQU 2
XADDAY_WEDNESDAY EQU 3
XADDAY_THURSDAY EQU 4
XADDAY_FRIDAY EQU 5
XADDAY_SATURDAY EQU 6
XADDAY_SUNDAY EQU 7 * sunday the last day of a week
STRUCTURE xadDeviceInfo,0 * for XAD_OUTDEVICE tag
APTR xdi_DeviceName * name of device
ULONG xdi_Unit * unit of device
APTR xdi_DOSName * instead of Device+Unit, dos name without ':'
*************************************************************************
* *
* information structures *
* *
*************************************************************************
STRUCTURE xadArchiveInfo,0
APTR xai_Client * pointer to unarchiving client
APTR xai_PrivateClient * private client data
APTR xai_Password * password for crypted archives
ULONG xai_Flags * read only XADAIF_ flags
ULONG xai_LowCyl * lowest cylinder to unarchive
ULONG xai_HighCyl * highest cylinder to unarchive
ULONG xai_InPos * input position, read only
ULONG xai_InSize * input size, read only
ULONG xai_OutPos * output position, read only
ULONG xai_OutSize * output file size, read only
APTR xai_FileInfo * data pointer for file arcs
APTR xai_DiskInfo * data pointer for disk arcs
APTR xai_CurFile * data pointer for current file arc
APTR xai_CurDisk * data pointer for current disk arc
* This structure is nearly complete private to either xadmaster or its
* clients. An application program may access for reading only xai_Client,
* xai_Flags, xai_FileInfo and xai_DiskInfo. For xai_Flags only XADAIF_CRYPTED
* is useful. All the other stuff is private and should not be accessed!
BITDEF XADAI,CRYPTED,0 * archive entries are encrypted
BITDEF XADAI,FILECORRUPT,1 * file is corrupt, but valid entries are in the list
BITDEF XADAI,FILEARCHIVE,2 * unarchive file entry
BITDEF XADAI,DISKARCHIVE,3 * unarchive disk entry
BITDEF XADAI,OVERWRITE,4 * overwrite the file
BITDEF XADAI,MAKEDIRECTORY,5 * create directory when missing
BITDEF XADAI,IGNOREGEOMETRY,6 * ignore drive geometry
STRUCTURE xadFileInfo,0
APTR xfi_Next
ULONG xfi_EntryNumber * number of entry, starts with 1
APTR xfi_EntryInfo * additional archiver text
APTR xfi_PrivateInfo * client private, see XAD_OBJPRIVINFOSIZE
ULONG xfi_Flags * see XADFIF_xxx defines
APTR xfi_FileName * see XAD_OBJNAMESIZE tag
APTR xfi_Comment * see XAD_OBJCOMMENTSIZE tag
ULONG xfi_Protection * OS 3 bits (including multiuser)
ULONG xfi_OwnerUID *